package com.lbmb.photodrawaimanager.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lbmb.photodrawaimanager.entity.dto.PhotoVideoCensusEntity;
import com.lbmb.photodrawaimanager.entity.req.PhotoVideoCensusReq;
import com.lbmb.photodrawaimanager.mapper.PhotoVideoCensusMapper;
import com.lbmb.photodrawaimanager.service.PhotoVideoCensusService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author hanWang
 * @Title:
 * @Package
 * @Description:
 * @date 2023/8/35:03 上午
 */
@Service
public class PhotoVideoCensusServiceImpl extends ServiceImpl<PhotoVideoCensusMapper, PhotoVideoCensusEntity>  implements PhotoVideoCensusService {
   @Autowired
   private PhotoVideoCensusMapper photoVideoCensusMapper;
    @Override
    public Boolean saveCensus(PhotoVideoCensusReq photoVideoCensusReq) {
        PhotoVideoCensusEntity photoVideoCensusEntity = new PhotoVideoCensusEntity();
        BeanUtils.copyProperties(photoVideoCensusReq,photoVideoCensusEntity);
        return photoVideoCensusMapper.insert(photoVideoCensusEntity)>1;
    }
}
